package org.example.test;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.util.Scanner;

public class test2 {
    public static void main(String[] args) throws FileNotFoundException {
        InputStream is=new FileInputStream("E:\\测试文件\\hello.txt");
        Scanner scanner=new Scanner(is,"UTF-8");
        while (scanner.hasNext()){
            String s=scanner.next();
            System.out.println(s);
        }
    }
}
